// pages/Components/NavBar.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    title: {
      type: String,
      value: '爱货运TMS'
    },
    showBack: {
      type: Boolean,
      value: false
    },
    showBackHome: {
      type: Boolean,
      value: false
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    tabPanelstyle: 'display:flex;justify-content:center;align-items:center;',
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onTabsChange(event) {
      console.log(`Change tab, tab-panel value is ${event.detail.value}.`);
    },
    onTabsClick(event) {
      console.log(`Click tab, tab-panel value is ${event.detail.value}.`);
    },
    onBack() {
      wx.navigateBack();
    },
    onGoHome() {
      wx.reLaunch({
        url: '/pages/index/index',
      });
    },
  }
})